local CommonOHOH = _G.CommonOHOH;
local M = CommonOHOH.class.new(script, CommonOHOH.files.Monster(),script.Parent.Name);

function M.new(...)
	return M(...);
end;

function M.ctor(self,lvId,id,battle,...)

   local attCtrl=battle:GetPrivateComponent("AttCtrl")

    M.super.ctor(self,lvId,id,battle,attCtrl:GetBossCFrame(),...);
    self:AddPrivateComponentByFolder(script.Parent.com)
    self:GetRootPart_Loop().Anchored=true
    
end;


--孵化一批小怪
function M.HatchMonster(self,monsterList)
  -- CommonOHOH:PrintTable(monsterList)
    self:GetPrivateComponent("hatch"):Hatch(monsterList)
end

-- 获取嘴的位置
function M.GetMousePos(self)
  return self:GetPosition()
end


-- 开始行动攻击玩家
function M.Action(self)
  --进入追击状态

  local cf=self.Battle:GetPrivateComponent("AttCtrl"):GetBossFightCFrame()
  self:SetCFrame(cf)
  task.wait()
  self:GetRootPart_Loop().Anchored=false
  self:ActiveAttack()
  self.ChaseTargetEvent:Action()
end



function M.dtor(self)

	M.super.dtor(self);
end;


return M
